<!DOCTYPE HTML>
<html>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
  <meta charset="UTF-8">

  <meta name="description" content="">
  <meta name="keywords" content="">

  <title>商品详情</title>

  <link rel="shortcut icon" href="favicon.ico">
  <link href="css/style.css" media="screen" rel="stylesheet" type="text/css">
  <link href="css/grid.css" media="screen" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="css/jquery.jqzoom.css" type="text/css">

  <script src="js/jquery-1.7.2.min.js" ></script>
  <script src="js/html5.js" ></script>
  <script src="js/jflow.plus.js" ></script>
  <script src="js/jquery.carouFredSel-5.2.2-packed.js"></script>
  <script src="js/checkbox.js"></script>
  <script src="js/radio.js"></script>
  <script src="js/selectBox.js"></script>
<!--  <script src="js/jquery.jqzoom-core.js" ></script>-->
  <script src="js/ajax.js" ></script>
    <script src="js/comment_add.js"></script>


  <script>
  $(document).ready(function() {
    $('#wrapper_tab a').click(function() {
      if ($(this).attr('class') != $('#wrapper_tab').attr('class') ) {
        $('#wrapper_tab').attr('class',$(this).attr('class'));
      }
      return false;
    });
  });
  </script>


</head>
<body>
  <div class="container_12">

      <header id="branding">
          <div class="grid_3">
              <hgroup>
                  <h1 id="site_logo" ><a href="index.php" title=""><img src="images/logo.png" alt="Online Store Theme Logo"/></a></h1>
                  <h2 id="site_description">长江文艺出版社</h2>
              </hgroup>
          </div><!-- .grid_3 -->

          <div class="grid_3">
              <form class="search" action="search_result.php">
                  <input type="text" name="search" class="entry_form" value="" placeholder="输入关键词..."/>
              </form>
          </div><!-- .grid_3 -->
          <!-- 购物车简要 -->
          <div class="grid_6">
              <ul id="cart_nav">
                  <li>
                      <a class="cart_li" href="#">我的购物车</a>
                      <ul class="cart_cont">

                          <?php
                          include_once("server/CartInfo_nav.php");
                          $shops_nav = getCart_forBox();
                          if ($shops_nav == false){
                              echo "
                          <li>
                            <a href=\"#\" class=\"prev_cart\"><div class=\"cart_vert\"><img src=\"book_pic/none.png\" alt=\"\" title=\"\" /></div></a>
                            <div class=\"cont_cart\">
                              <h4>None</h4>
                              <div class=\"price\">&nbsp;None</div>
                            </div>
                            <div class=\"clear\"></div>
                          </li>
                        ";
                          }else{
                              while ($row_nav = $shops_nav->fetch_row()){
                                  echo "
                              <li>
                                <a href=\"product_page.php?id=$row_nav[0]\" class=\"prev_cart\"><div class=\"cart_vert\"><img src=\"book_pic/$row_nav[0].jpg\" alt=\"\" title=\"\" /></div></a>
                                <div class=\"cont_cart\">
                                  <h4>《$row_nav[1]》</h4>
                                  <div class=\"price\">&nbsp;￥$row_nav[2]</div>
                                </div>
                                <div class=\"clear\"></div>
                              </li>
                            ";
                              }
                          }
                          ?>

                          <li class="no_border">
                              <a href="shopping_cart.php" class="view_cart">查看购物车</a>
                              <a href="pay_order.php" class="checkout">立即购买</a>
                          </li>
                      </ul>
                  </li>
              </ul>

              <nav class="private">
                  <ul>
                      <li><a href="#" id="myAccount">用户名</a></li>
                      <li class="separator">|</li>
                      <li><a href="#">收藏夹</a></li>
                      <li class="separator">|</li>
                      <li><a href="login.php" id="user_state" onclick="user_quiz()">登 录</a></li>  <!--登录后改为退出二字-->
                  </ul>
              </nav><!-- .private -->
          </div><!-- .grid_6 -->
      </header><!-- #branding -->
<div class="clear"></div>
  </div><!-- .container_12 -->
<!-- 导航栏 -->
  <div id="block_nav_primary">
    <div class="container_12">
      <div class="grid_12">
        <nav class="primary">
          <ul>
            <li class="curent"><a href="index.php">书苑主页</a></li>
            <li><a href="press_intro.php">长江简介</a></li>
            <li><a href="news_list.php">新闻动态</a></li>
            <li><a href="#">图书商城 </a>
      <ul class="sub">
                <li><a href="book_all.php">全部图书</a></li>
                <li><a href="book_catalog.php">分类浏览</a></li>
            </ul>
           </li>
            <li><a href="contact_us.php">联系我们</a></li>
          </ul>
        </nav><!-- .primary -->
      </div><!-- .grid_12 -->
    </div><!-- .container_12 -->
</div><!-- .block_nav_primary -->

  <div class="container_12">
    <div class="grid_12">
       <div class="breadcrumbs">
        <a href="index.php">主页</a><span>&#8250;</span><a href="book_catalog.php">图书分类</a><span>&#8250;</span><span class="current">图书详情</span>
       </div><!-- .breadcrumbs -->
    </div><!-- .grid_12 -->
  </div><!-- .container_12 -->

  <div class="clear"></div>

  <section id="main">
    <div class="container_12">
       <div id="sidebar" class="grid_3">

<!--   特价图书侧栏      -->
        <aside id="specials" class="specials">
         <h3>特价图书</h3>

         <ul>
          <?php
            date_default_timezone_set('prc');
            include "operation/bookinfo_out.php";

            for($i = 0; $i < 4;$i++){
          ?>
            <li>
                <div class="prev">
                    <a href="product_page.php?id=<?php echo $rbook[$i]['id'];?>"><img src="<?php echo $rbook[$i]['picture'];?>" alt="" title="" /></a>
                </div>

                <div class="cont">
                    <a href="product_page.php?id=<?php echo $rbook[$i]['id'];?>"><?php echo $rbook[$i]['name'];?></a>
                <div class="prise">
                    <span class="old">￥<?php echo $rbook[$i]['price'];?></span>￥<?php echo number_format($rbook[$i]['price']*0.75,2);?></div>
                </div>
            </li>

        <?php
            }
        ?>
         </ul>
        </aside><!-- #specials -->
           <aside id="tags">
               <h3>购买热门</h3>
               <?php
               $i = 0;
               foreach($rbook as $rb){
                   $j=rand(0,1);$k=rand(1001,1015);
                   if(($i++)>=8) break;
                   if($j){?>
                       <a class="t1" href="product_page.php?id=<?php echo $rb['id'];?>"><?php echo $rb['author'];}else?></a>
                       <a class="t2" href="product_page.php?id=<?php echo $rb['id'];?>"><?php  echo $rb['name'];?></a>
               <?php }?>
           </aside><!-- #community_poll -->

      
       </div><!-- .sidebar -->

        <?php

        ?>

       <div id="content" class="grid_9">
        <h1 class="page_title">《<?php echo $book['name'];?>》</h1>

    <div class="product_page">
      <div class="grid_4 img_slid" id="products">
        <div class="preview slides_container">
          <div class="prev_bg">
            <a href="<?php echo $book['picture'];?>" class="jqzoom" rel='gal1' title="">
              <img src="<?php echo $book['picture'];?>" id="<?php echo $book['id'];?>" title="book_pic" alt="" name="goods_pic"/>
            </a>
          </div>
        </div><!-- .prev -->
      </div><!-- .grid_4 -->

      <div class="grid_5">
        <div class="entry_content">
          <h6>书名：<span><strong>《<?php echo $book['name'];?>》</strong></span></h6>
          <h6>作者：<span><strong><?php echo $book['author'];?></strong></span></h6>
          <h6>出版时间：<span><?php echo $book['time'];?></span></h6>  
          <h6>ISBN：<span><?php echo $book['isbn'];?></span></h6>
          <h6>出版社：<span>长江文艺出版社</span></h6>

          <div class="ava_price">

            <div class="price">
              <div class="price_new"><b>价格：</b>￥<?php echo $book['price'];?></div>
            </div><!-- .price -->
          </div><!-- .ava_price -->

          <div class="block_cart">
            <div class="obn_like">
              <div class="like"><a href="#" class="like">收藏</a></div>
            </div>

            <div class="cart">
              <a class="bay" onclick="addToCart_1()">添加到购物车</a>
              <input type="text" name="goods_num" class="number" value="1"/>
            </div>
            <div class="clear"></div>
          </div><!-- .block_cart -->
<!--          <div class="soc">
            <img src="images/soc.png" alt="Soc"/>
          </div> -->
        </div><!-- .entry_content -->

      </div><!-- .grid_5 -->

      <div class="clear"></div>

      <div class="grid_9" >
        <div id="wrapper_tab" class="tab1">
          <a href="#" class="tab1 tab_link">内容简介</a>
          <a href="#" class="tab2 tab_link">图书评论</a>

          <div class="clear"></div>

          <div class="tab1 tab_body">
          <br>
             <h5>《<?php echo $book["name"];?>》</h5>
            <p><?php echo $book['intro'];?></p>
          </div><!-- .tab1 .tab_body -->

          <div class="tab2 tab_body">
            <ul class="comments">

                  <?php
//                    $comment = array();   //测试代码
                  if(count($comment) >= 1){  //判空
                      foreach($comment as $com){
                          $id_c = $com["user_name"];
                          $time_c = $com["time"];
                          $content_c = $com["content"];
                          echo "
                        <li>
                            ID：<strong>$id_c</strong>
                             <span class=\"time\">$time_c</span>
                             <p>$content_c</p>
                        </li>
                      ";
                      }
                  }else{
                      echo "<p>这本书还没有评论，您可以在下方添加评论。</p>";
                  }
                  ?>

            </ul>

              <!-- .comments  发表评论-->
            <form class="add_comments">
            <br>
              <h4>发表评论</h4>
              <div class="text_review">
                <strong>评论</strong><sup class="surely">*</sup><br/>
                <textarea id="comment_text" title="<?php echo $book['id'];?>"></textarea>
              </div><!-- .text_review -->
            </form><!-- .add_comments -->
            <button class="btn_submit" onclick="addComment()">发表</button>

          <div class="clear"></div>
          </div><!-- .tab2 .tab_body -->

          <div class="clear"></div>
        </div>​<!-- #wrapper_tab -->
        <div class="clear"></div>
      </div><!-- .grid_9 -->

      <div class="clear"></div>

    </div><!-- .product_page -->
    <div class="clear"></div>

       </div><!-- #content -->

      <div class="clear"></div>

    </div><!-- .container_12 -->
  </section><!-- #main -->

  <div class="clear"></div>
   <!-- 底部信息 -->
  <footer>
    <div class="f_navigation">
      <div class="container_12">
        <div class="grid_3">
          <h3>联系我们</h3>
          <ul class="f_contact">
            <li>湖北省武汉市雄楚大街268号</li>
            <li>+86 027-87679307</li>
            <li>cjwytgc@163.com</li>
          </ul><!-- .f_contact -->
        </div><!-- .grid_3 -->
      
        <div class="grid_3">
          <h3>信息服务</h3>
          <nav class="f_menu">
            <ul>
              <li><a href="press_intro.php">关于我们</a></li>
              <li><a href="#">用户协议</a></li>
              <li><a href="#">意见反馈</a></li>
            </ul>
          </nav><!-- .private -->
        </div><!-- .grid_3 -->
        
        <div class="grid_3">
          <h3>网站服务</h3>
          <nav class="f_menu">
            <ul>
              <li><a href="contact_us.php">联系我们</a></li>
              <li><a href="#">常见问题</a></li>
              <li><a href="#">网站地图</a></li>
              
            </ul>
          </nav><!-- .private -->
        </div><!-- .grid_3 -->
        
        <div class="grid_3">
          <h3>购物指南</h3>
          <nav class="f_menu">
            <ul>
              <li><a href="#">支付方式</a></li>
              <li><a href="#">配送方式</a></li>
              <li><a href="#">售后政策</a></li>
              
            </ul>
          </nav><!-- .private -->
        </div><!-- .grid_3 -->    
      </div><!-- .container_12 -->
    </div><!-- .f_navigation -->
  </footer>
</body>
</html>